
public class StartRoomBedAssignmentEvent extends EventBase {
	private PatientBase patient;
	private Bed bed;
	
	public StartRoomBedAssignmentEvent(int id, PatientBase patient) {
		this.patient = patient;
		this.bed = bed;
	}
	
	public boolean canOccur(State state) {
		if(state.isRoomBedAvailable())
			return true;
		else
			return false;
	}
	
	public void execute(State state) {
		patient.setActivity(TreatmentType.BedAssignment);
		Simulator.addEvent(new EndRoomBedAssignmentEvent(patient, Simulator.nextNormal(10, 3)));
	}

}
